import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/components/common/Home'
import Header from '@/components/common/Header'
import Sidebar from '@/components/common/Sidebar'

import Login from '@/views/Login'
import MovieInfo from '@/views/MovieInfo'
import HallInfo from '@/views/HallInfo'
import OrderInfo from '@/views/OrderInfo'
import Charts from '@/views/Charts'
import Schedule from '@/views/Schedule'
import ScheduleInfo from '@/views/ScheduleInfo'
import UpdateSche from '@/views/UpdateSche'
import ActorInfo from '@/views/ActorInfo'
import DirectInfo from '@/views/DirectInfo'
Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Home',
    component: Home,
    children: [{
      path: '/MovieInfo',
      name: 'MovieInfo',
      component: MovieInfo
    }, {
      path: '/HallInfo',
      name: 'HallInfo',
      component: HallInfo
    }, {
      path: '/OrderInfo',
      name: 'OrderInfo',
      component: OrderInfo
    }, {
      path: '/Charts',
      name: 'Charts',
      component: Charts
    },{
      path: '/Schedule',
      name: 'Schedule',
      component: Schedule
    },{
      path: '/ScheduleInfo',
      name: 'ScheduleInfo',
      component: ScheduleInfo
    },{
      path: '/UpdateSche',
      name: 'UpdateSche',
      component: UpdateSche
    },{
      path: '/ActorInfo',
      name: 'ActorInfo',
      component: ActorInfo
    },{
      path: '/DirectInfo',
      name: 'DirectInfo',
      component: DirectInfo
    }]
  }, {
    path: '/',
    redirect: '/dashboard'
  },
  {
    path: '/Login',
    name: 'Login',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: Login
  }
]

const router = new VueRouter({
  mode: 'hash',
  routes
})

export default router